package com.hsnn.medstgmini.base.std.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Embeddable;


/**
 * StdDruginfoLogId entity. @author MyEclipse Persistence Tools
 */
@Embeddable

public class StdDruginfoLogId  implements java.io.Serializable {


    // Fields    

     private String drugId;
     private String drugCode;
     private String drugName;
     private String drugNameSpel;
     private String drugNameEng;
     private String busName;
     private String formId;
     private String specId;
     private Integer factor;
     private String unit;
     private String prodCompId;
     private String materialId;
     private String approvalCode;
     private Timestamp approvalDate;
     private Short status;
     private Timestamp updDatetime;
     private String updUser;
     private String historyDrugCode;
     private Short mergeStatus;


    // Constructors

    /** default constructor */
    public StdDruginfoLogId() {
    }

	/** minimal constructor */
    public StdDruginfoLogId(String drugId, String drugCode, String drugName, String formId, String specId, String prodCompId) {
        this.drugId = drugId;
        this.drugCode = drugCode;
        this.drugName = drugName;
        this.formId = formId;
        this.specId = specId;
        this.prodCompId = prodCompId;
    }
    
    /** full constructor */
    public StdDruginfoLogId(String drugId, String drugCode, String drugName, String drugNameSpel, String drugNameEng, String busName, String formId, String specId, Integer factor, String unit, String prodCompId, String materialId, String approvalCode, Timestamp approvalDate, Short status, Timestamp updDatetime, String updUser, String historyDrugCode, Short mergeStatus) {
        this.drugId = drugId;
        this.drugCode = drugCode;
        this.drugName = drugName;
        this.drugNameSpel = drugNameSpel;
        this.drugNameEng = drugNameEng;
        this.busName = busName;
        this.formId = formId;
        this.specId = specId;
        this.factor = factor;
        this.unit = unit;
        this.prodCompId = prodCompId;
        this.materialId = materialId;
        this.approvalCode = approvalCode;
        this.approvalDate = approvalDate;
        this.status = status;
        this.updDatetime = updDatetime;
        this.updUser = updUser;
        this.historyDrugCode = historyDrugCode;
        this.mergeStatus = mergeStatus;
    }

   
    // Property accessors

    @Column(name="drug_id", nullable=false, length=36)

    public String getDrugId() {
        return this.drugId;
    }
    
    public void setDrugId(String drugId) {
        this.drugId = drugId;
    }

    @Column(name="drug_code", nullable=false, length=100)

    public String getDrugCode() {
        return this.drugCode;
    }
    
    public void setDrugCode(String drugCode) {
        this.drugCode = drugCode;
    }

    @Column(name="drug_name", nullable=false, length=512)

    public String getDrugName() {
        return this.drugName;
    }
    
    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }

    @Column(name="drug_name_spel", length=128)

    public String getDrugNameSpel() {
        return this.drugNameSpel;
    }
    
    public void setDrugNameSpel(String drugNameSpel) {
        this.drugNameSpel = drugNameSpel;
    }

    @Column(name="drug_name_eng", length=512)

    public String getDrugNameEng() {
        return this.drugNameEng;
    }
    
    public void setDrugNameEng(String drugNameEng) {
        this.drugNameEng = drugNameEng;
    }

    @Column(name="bus_name", length=256)

    public String getBusName() {
        return this.busName;
    }
    
    public void setBusName(String busName) {
        this.busName = busName;
    }

    @Column(name="form_id", nullable=false, length=36)

    public String getFormId() {
        return this.formId;
    }
    
    public void setFormId(String formId) {
        this.formId = formId;
    }

    @Column(name="spec_id", nullable=false, length=36)

    public String getSpecId() {
        return this.specId;
    }
    
    public void setSpecId(String specId) {
        this.specId = specId;
    }

    @Column(name="factor")

    public Integer getFactor() {
        return this.factor;
    }
    
    public void setFactor(Integer factor) {
        this.factor = factor;
    }

    @Column(name="unit", length=36)

    public String getUnit() {
        return this.unit;
    }
    
    public void setUnit(String unit) {
        this.unit = unit;
    }

    @Column(name="prod_comp_id", nullable=false, length=36)

    public String getProdCompId() {
        return this.prodCompId;
    }
    
    public void setProdCompId(String prodCompId) {
        this.prodCompId = prodCompId;
    }

    @Column(name="material_id", length=36)

    public String getMaterialId() {
        return this.materialId;
    }
    
    public void setMaterialId(String materialId) {
        this.materialId = materialId;
    }

    @Column(name="approval_code", length=100)

    public String getApprovalCode() {
        return this.approvalCode;
    }
    
    public void setApprovalCode(String approvalCode) {
        this.approvalCode = approvalCode;
    }

    @Column(name="approval_date", length=19)

    public Timestamp getApprovalDate() {
        return this.approvalDate;
    }
    
    public void setApprovalDate(Timestamp approvalDate) {
        this.approvalDate = approvalDate;
    }

    @Column(name="status")

    public Short getStatus() {
        return this.status;
    }
    
    public void setStatus(Short status) {
        this.status = status;
    }

    @Column(name="upd_datetime", length=19)

    public Timestamp getUpdDatetime() {
        return this.updDatetime;
    }
    
    public void setUpdDatetime(Timestamp updDatetime) {
        this.updDatetime = updDatetime;
    }

    @Column(name="upd_user", length=36)

    public String getUpdUser() {
        return this.updUser;
    }
    
    public void setUpdUser(String updUser) {
        this.updUser = updUser;
    }

    @Column(name="history_drug_code", length=100)

    public String getHistoryDrugCode() {
        return this.historyDrugCode;
    }
    
    public void setHistoryDrugCode(String historyDrugCode) {
        this.historyDrugCode = historyDrugCode;
    }

    @Column(name="merge_status")

    public Short getMergeStatus() {
        return this.mergeStatus;
    }
    
    public void setMergeStatus(Short mergeStatus) {
        this.mergeStatus = mergeStatus;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof StdDruginfoLogId) ) return false;
		 StdDruginfoLogId castOther = ( StdDruginfoLogId ) other; 
         
		 return ( (this.getDrugId()==castOther.getDrugId()) || ( this.getDrugId()!=null && castOther.getDrugId()!=null && this.getDrugId().equals(castOther.getDrugId()) ) )
 && ( (this.getDrugCode()==castOther.getDrugCode()) || ( this.getDrugCode()!=null && castOther.getDrugCode()!=null && this.getDrugCode().equals(castOther.getDrugCode()) ) )
 && ( (this.getDrugName()==castOther.getDrugName()) || ( this.getDrugName()!=null && castOther.getDrugName()!=null && this.getDrugName().equals(castOther.getDrugName()) ) )
 && ( (this.getDrugNameSpel()==castOther.getDrugNameSpel()) || ( this.getDrugNameSpel()!=null && castOther.getDrugNameSpel()!=null && this.getDrugNameSpel().equals(castOther.getDrugNameSpel()) ) )
 && ( (this.getDrugNameEng()==castOther.getDrugNameEng()) || ( this.getDrugNameEng()!=null && castOther.getDrugNameEng()!=null && this.getDrugNameEng().equals(castOther.getDrugNameEng()) ) )
 && ( (this.getBusName()==castOther.getBusName()) || ( this.getBusName()!=null && castOther.getBusName()!=null && this.getBusName().equals(castOther.getBusName()) ) )
 && ( (this.getFormId()==castOther.getFormId()) || ( this.getFormId()!=null && castOther.getFormId()!=null && this.getFormId().equals(castOther.getFormId()) ) )
 && ( (this.getSpecId()==castOther.getSpecId()) || ( this.getSpecId()!=null && castOther.getSpecId()!=null && this.getSpecId().equals(castOther.getSpecId()) ) )
 && ( (this.getFactor()==castOther.getFactor()) || ( this.getFactor()!=null && castOther.getFactor()!=null && this.getFactor().equals(castOther.getFactor()) ) )
 && ( (this.getUnit()==castOther.getUnit()) || ( this.getUnit()!=null && castOther.getUnit()!=null && this.getUnit().equals(castOther.getUnit()) ) )
 && ( (this.getProdCompId()==castOther.getProdCompId()) || ( this.getProdCompId()!=null && castOther.getProdCompId()!=null && this.getProdCompId().equals(castOther.getProdCompId()) ) )
 && ( (this.getMaterialId()==castOther.getMaterialId()) || ( this.getMaterialId()!=null && castOther.getMaterialId()!=null && this.getMaterialId().equals(castOther.getMaterialId()) ) )
 && ( (this.getApprovalCode()==castOther.getApprovalCode()) || ( this.getApprovalCode()!=null && castOther.getApprovalCode()!=null && this.getApprovalCode().equals(castOther.getApprovalCode()) ) )
 && ( (this.getApprovalDate()==castOther.getApprovalDate()) || ( this.getApprovalDate()!=null && castOther.getApprovalDate()!=null && this.getApprovalDate().equals(castOther.getApprovalDate()) ) )
 && ( (this.getStatus()==castOther.getStatus()) || ( this.getStatus()!=null && castOther.getStatus()!=null && this.getStatus().equals(castOther.getStatus()) ) )
 && ( (this.getUpdDatetime()==castOther.getUpdDatetime()) || ( this.getUpdDatetime()!=null && castOther.getUpdDatetime()!=null && this.getUpdDatetime().equals(castOther.getUpdDatetime()) ) )
 && ( (this.getUpdUser()==castOther.getUpdUser()) || ( this.getUpdUser()!=null && castOther.getUpdUser()!=null && this.getUpdUser().equals(castOther.getUpdUser()) ) )
 && ( (this.getHistoryDrugCode()==castOther.getHistoryDrugCode()) || ( this.getHistoryDrugCode()!=null && castOther.getHistoryDrugCode()!=null && this.getHistoryDrugCode().equals(castOther.getHistoryDrugCode()) ) )
 && ( (this.getMergeStatus()==castOther.getMergeStatus()) || ( this.getMergeStatus()!=null && castOther.getMergeStatus()!=null && this.getMergeStatus().equals(castOther.getMergeStatus()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getDrugId() == null ? 0 : this.getDrugId().hashCode() );
         result = 37 * result + ( getDrugCode() == null ? 0 : this.getDrugCode().hashCode() );
         result = 37 * result + ( getDrugName() == null ? 0 : this.getDrugName().hashCode() );
         result = 37 * result + ( getDrugNameSpel() == null ? 0 : this.getDrugNameSpel().hashCode() );
         result = 37 * result + ( getDrugNameEng() == null ? 0 : this.getDrugNameEng().hashCode() );
         result = 37 * result + ( getBusName() == null ? 0 : this.getBusName().hashCode() );
         result = 37 * result + ( getFormId() == null ? 0 : this.getFormId().hashCode() );
         result = 37 * result + ( getSpecId() == null ? 0 : this.getSpecId().hashCode() );
         result = 37 * result + ( getFactor() == null ? 0 : this.getFactor().hashCode() );
         result = 37 * result + ( getUnit() == null ? 0 : this.getUnit().hashCode() );
         result = 37 * result + ( getProdCompId() == null ? 0 : this.getProdCompId().hashCode() );
         result = 37 * result + ( getMaterialId() == null ? 0 : this.getMaterialId().hashCode() );
         result = 37 * result + ( getApprovalCode() == null ? 0 : this.getApprovalCode().hashCode() );
         result = 37 * result + ( getApprovalDate() == null ? 0 : this.getApprovalDate().hashCode() );
         result = 37 * result + ( getStatus() == null ? 0 : this.getStatus().hashCode() );
         result = 37 * result + ( getUpdDatetime() == null ? 0 : this.getUpdDatetime().hashCode() );
         result = 37 * result + ( getUpdUser() == null ? 0 : this.getUpdUser().hashCode() );
         result = 37 * result + ( getHistoryDrugCode() == null ? 0 : this.getHistoryDrugCode().hashCode() );
         result = 37 * result + ( getMergeStatus() == null ? 0 : this.getMergeStatus().hashCode() );
         return result;
   }   





}